package abcy.cloud.syscoreserver.mappers;

import abcy.cloud.syscoreserver.dto.req.SysPermissionsSelectReqDto;
import abcy.cloud.syscoreserver.dto.resp.SysPermissionSelectRespDto;
import abcy.cloud.syscoreserver.entities.SysPermission;
import abcy.cloud.syscoreserver.entities.SysRolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    List<SysPermissionSelectRespDto> getPermissionsForPage(@Param("req")SysPermissionsSelectReqDto sysPermissionsSelectReqDto);

    String getMaxPermissionsCode();

    SysPermissionSelectRespDto getPermissionById(@Param("id") String id);

    List<SysPermissionSelectRespDto> selectPermissionByConditions(@Param("req")SysPermissionsSelectReqDto sysPermissionsSelectReqDto);
}